package com.boot.unity.api.wx.controller;

import com.boot.unity.api.wx.entity.TrainSchoolEval;
import com.boot.unity.api.wx.service.WxSchoolEvalService;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 驾校评价
 */
@RestController
@RequestMapping("/wx/schoolEval")
@Validated
public class WxSchoolEvalController {
    private final Log logger = LogFactory.getLog(WxSchoolEvalController.class);

    @Autowired
    private WxSchoolEvalService wxSchoolEvalService;

    @GetMapping("schoolStuEval")
    public Object schoolStuEval(String schoolId){
       return wxSchoolEvalService.setSchoolId(schoolId);
    }
    /**
     * 评价驾校
     * @param schoolEval
     * @return
     */
    @PostMapping("save")
    public Object save(@RequestBody TrainSchoolEval schoolEval) {
        return wxSchoolEvalService.save(schoolEval);
    }

}
